<?php

use yii\helpers\Html;
use yii\grid\GridView;

/* @var $this yii\web\View */
/* @var $searchModel common\models\LydbUserQuery */
/* @var $dataProvider yii\data\ActiveDataProvider */

$this->title = '高级特性测试用户列表';
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="lydb-user-index">

    <?php  echo $this->render('_search', ['model' => $searchModel]); ?>
    
    <?php echo GridView::widget([
        'dataProvider' => $dataProvider,
        'columns' => [
            ['class' => 'yii\grid\SerialColumn'],

            'lydb_id',
            'mobile',
            'password',
            'create_time:datetime',
            // 'create_time:datetime',
            [
                'label' =>  'token',
                'value' =>  function($model){
                    return (new \common\services\UserService())->getToken($model);
                }
            ]
            //['class' => 'yii\grid\ActionColumn'],
        ],
    ]); ?>

</div>
